<template>
	<view class="settle_box">
		<!-- 全选 -->
		<label class="radio">
			<radio color="#c00000" :checked="isfull" @click="changeAll"><text>全选</text></radio>
		</label>
		<view class="settle_conter">
			合计：<text>$ {{checkGoodsmount}}</text>
		</view>
		<view class="settle_right">
			结算（{{checkedCount}}）
		</view>
	</view>
</template>

<script>
	import {mapGetters} from 'vuex'
	export default {
		name:"my-settle",
		data() {
			return {
				
			};
		},
		computed:{
			...mapGetters(['checkedCount','total','checkGoodsmount']),
			isfull(){
				return this.checkedCount===this.total
			}
		},
		methods:{
			changeAll(){
				this.$store.commit('UPALLADDRESS',!this.isfull)
			}
		}
	}
</script>

<style lang="scss">
.settle_box{
	position: fixed;
	bottom: 0;
	left: 0;
	height: 50px;
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 14px;
	padding-left:5px ;
	.radio{
		
	}
	.settle_conter{
		text{
			color:red;
			font-weight: bold;
		}
	}
	.settle_right{
		background-color: red;
		padding: 0 10px;
		min-width: 100px;
		line-height: 50px;
		text-align: center;
	}
}
</style>